{% extends 'EstocBundle:Collaborator:collaboratorHome.html.twig' %}

{% block content_collaborator %}
<div class="container-space home-container">
    <ul class="menu_home clearfix pure-g">
        {% for image in images %}
            <li class="pure-u search-thumb">
                <div>
                    <img class="image-link" src="{{ (vich_uploader_asset(image,'file')) | apply_filter('search_thumb') }}" />
                </div>
                <div>
                    {% if image.contract %}
                        <button class="btn modal" href="{{ path('collaboratorUploadContractImage',{'id':image.id}) }}">Reemplazar</button>
                    {% else %}
                        <button class="btn modal" href="{{ path('collaboratorUploadContractImage',{'id':image.id}) }}">AGREGAR</button>
                    {% endif %}
                </div>
            </li>
        {% endfor %}
    </ul>
</div>
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('js/colorbox/example5/colorbox.css') }}">
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript" src="{{ asset('js/colorbox/jquery.colorbox-min.js') }}"> </script>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".modal").colorbox({iframe:true, width:"650", height:"450"});
        });
    </script>
{% endblock %}